/*
 * @Author: Creator
 * @Date: 2020-10-09 14:04:33
 * @LastEditors: Creator
 * @LastEditTime: 2020-10-09 21:39:15
 * @Description: file content
 */
#ifndef MEDICALRECORD_H
#define MEDICALRECORD_H

#include "mytime.h"
#include "patient.h"
#include "doctor.h"
#include "medicine.h"
#include "hospital.h"

typedef struct Diagnosis {
	float CheckCost;
	medicine Medicine;
	HsptRecord hospital;	
}Diagnosis;
void inputDiagnosis(Diagnosis* data);
int calculateCost(Diagnosis* data);
void outputDiagnosis(Diagnosis* data);

typedef struct MedicalRecord {
	Date Time;
	Patient* patient;
	Doctor* doctor;
	Diagnosis dignosis;
}MedicalRecord;

typedef struct MedicalRecordNode
{
    MedicalRecord data;
    struct MedicalRecordNode *pre;
    struct MedicalRecordNode *next;
    
} MedRecNode;

Nature MedicalRecordNum;


MedRecNode* readAMedRec(FILE* fp);                                         // 加载单个患者信息
MedRecNode* loadMedRecList();                                            // 加载患者信息
MedRecNode* createNullMedRecNode();                                       // 创建空节点用于存储信息
bool writeAMedRec(FILE* fp, MedRecNode* MedRec);                         // 写入一个患者
bool writeMedRecList(MedRecNode* MedRecList);

// 文件读写


#endif